package cn.school.test;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import cn.school.dao.ExamResultDao;
import cn.school.dao.StudentDao;
import cn.school.dao.StudentDao2;
import cn.school.util.MyBatisUtil;
import cn.shcool.entity.ExamResult;
import cn.shcool.entity.Student;

public class StudentTest5 {

	public static void main(String[] args) {

		// 查询部分列
		SqlSession session = MyBatisUtil.get();
		ExamResultDao dao = session.getMapper(ExamResultDao.class);
		ExamResult r = dao.get1(1L);
		System.out.println(r);
		System.out.println(r.getStudent());

//		StudentDao2 dao = session.getMapper(StudentDao2.class);
//		List<Student> list = dao.search("李", "151");
//		for (Student stu : list)
//			System.out.println(stu);
		MyBatisUtil.close(session);

	}

}
